package com.sky.api.ware;

import com.sky.dto.SkuStockVO;
import com.sky.to.member.MemberReceiveAddressTo;
import com.sky.to.ware.StockTo;
import com.sky.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient("sky-mall-ware")
public interface WareFeignService {

    @PostMapping("/wareSku/getSkuStock")
    R<List<SkuStockVO>> getSkuStock(@RequestBody List<Long> skuIds);

    @GetMapping("/wareSku/getFreight")
    R<MemberReceiveAddressTo> getFreight(@RequestParam("addrId")Long addrId) throws Exception;

    @PostMapping("/wareSku/lockStock")
    R<Boolean> lockStock(@RequestBody StockTo stockTo);
}
